package com.gec.zhs.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 表单模板表
 * @TableName form
 */
@TableName(value ="form")
@Data
public class Form implements Serializable {
    /**
     * 表单模板Id
     */
    @TableId
    private String id;

    /**
     * 表单名称
     */
    private String name;

    /**
     * 表单类型，0：默认动态表单；1：Web自定义表单
     */
    private Integer frmtype;

    /**
     * 系统页面标识，当表单类型为用Web自定义的表单时，需要标识加载哪个页面
     */
    private String webid;

    /**
     * 字段个数
     */
    private Integer fields;

    /**
     * 表单中的控件属性描述
     */
    private String contentdata;

    /**
     * 表单控件位置模板
     */
    private String contentparse;

    /**
     * 表单原html模板未经处理的
     */
    private String content;

    /**
     * 排序码
     */
    private Integer sortcode;

    /**
     * 删除标记
     */
    private Integer deletemark;

    /**
     * 数据库名称
     */
    private String dbname;

    /**
     * 有效
     */
    private Integer disabled;

    /**
     * 备注
     */
    private String description;

    /**
     * 创建时间
     */
    private Date createdate;

    /**
     * 创建用户主键
     */
    private String createuserid;

    /**
     * 创建用户
     */
    private String createusername;

    /**
     * 修改时间
     */
    private Date modifydate;

    /**
     * 修改用户主键
     */
    private String modifyuserid;

    /**
     * 修改用户
     */
    private String modifyusername;

    /**
     * 所属部门
     */
    private String orgid;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Form other = (Form) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getFrmtype() == null ? other.getFrmtype() == null : this.getFrmtype().equals(other.getFrmtype()))
            && (this.getWebid() == null ? other.getWebid() == null : this.getWebid().equals(other.getWebid()))
            && (this.getFields() == null ? other.getFields() == null : this.getFields().equals(other.getFields()))
            && (this.getContentdata() == null ? other.getContentdata() == null : this.getContentdata().equals(other.getContentdata()))
            && (this.getContentparse() == null ? other.getContentparse() == null : this.getContentparse().equals(other.getContentparse()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getSortcode() == null ? other.getSortcode() == null : this.getSortcode().equals(other.getSortcode()))
            && (this.getDeletemark() == null ? other.getDeletemark() == null : this.getDeletemark().equals(other.getDeletemark()))
            && (this.getDbname() == null ? other.getDbname() == null : this.getDbname().equals(other.getDbname()))
            && (this.getDisabled() == null ? other.getDisabled() == null : this.getDisabled().equals(other.getDisabled()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getCreatedate() == null ? other.getCreatedate() == null : this.getCreatedate().equals(other.getCreatedate()))
            && (this.getCreateuserid() == null ? other.getCreateuserid() == null : this.getCreateuserid().equals(other.getCreateuserid()))
            && (this.getCreateusername() == null ? other.getCreateusername() == null : this.getCreateusername().equals(other.getCreateusername()))
            && (this.getModifydate() == null ? other.getModifydate() == null : this.getModifydate().equals(other.getModifydate()))
            && (this.getModifyuserid() == null ? other.getModifyuserid() == null : this.getModifyuserid().equals(other.getModifyuserid()))
            && (this.getModifyusername() == null ? other.getModifyusername() == null : this.getModifyusername().equals(other.getModifyusername()))
            && (this.getOrgid() == null ? other.getOrgid() == null : this.getOrgid().equals(other.getOrgid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getFrmtype() == null) ? 0 : getFrmtype().hashCode());
        result = prime * result + ((getWebid() == null) ? 0 : getWebid().hashCode());
        result = prime * result + ((getFields() == null) ? 0 : getFields().hashCode());
        result = prime * result + ((getContentdata() == null) ? 0 : getContentdata().hashCode());
        result = prime * result + ((getContentparse() == null) ? 0 : getContentparse().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getSortcode() == null) ? 0 : getSortcode().hashCode());
        result = prime * result + ((getDeletemark() == null) ? 0 : getDeletemark().hashCode());
        result = prime * result + ((getDbname() == null) ? 0 : getDbname().hashCode());
        result = prime * result + ((getDisabled() == null) ? 0 : getDisabled().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getCreatedate() == null) ? 0 : getCreatedate().hashCode());
        result = prime * result + ((getCreateuserid() == null) ? 0 : getCreateuserid().hashCode());
        result = prime * result + ((getCreateusername() == null) ? 0 : getCreateusername().hashCode());
        result = prime * result + ((getModifydate() == null) ? 0 : getModifydate().hashCode());
        result = prime * result + ((getModifyuserid() == null) ? 0 : getModifyuserid().hashCode());
        result = prime * result + ((getModifyusername() == null) ? 0 : getModifyusername().hashCode());
        result = prime * result + ((getOrgid() == null) ? 0 : getOrgid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", frmtype=").append(frmtype);
        sb.append(", webid=").append(webid);
        sb.append(", fields=").append(fields);
        sb.append(", contentdata=").append(contentdata);
        sb.append(", contentparse=").append(contentparse);
        sb.append(", content=").append(content);
        sb.append(", sortcode=").append(sortcode);
        sb.append(", deletemark=").append(deletemark);
        sb.append(", dbname=").append(dbname);
        sb.append(", disabled=").append(disabled);
        sb.append(", description=").append(description);
        sb.append(", createdate=").append(createdate);
        sb.append(", createuserid=").append(createuserid);
        sb.append(", createusername=").append(createusername);
        sb.append(", modifydate=").append(modifydate);
        sb.append(", modifyuserid=").append(modifyuserid);
        sb.append(", modifyusername=").append(modifyusername);
        sb.append(", orgid=").append(orgid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}